﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Devdream.Models;
using System.Security.Claims;
namespace Devdream.IBLL
{
    /// <summary>
    /// 用户相关接口
    /// </summary>
    public interface  InterfaceUserService:InterfaceBaseSerice<User>
    {
        /// <summary>
        /// 用户是否存在
        /// </summary>
        /// <param name="userName">用户名</param>
        /// <returns></returns>
        bool Exist(string userName);
        /// <summary>
        /// 查找用户
        /// </summary>
        /// <param name="userID">用户ID</param>
        /// <returns></returns>
        User Find(int userID);
        /// <summary>
        /// 查找用户
        /// </summary>
        /// <param name="userName">用户名</param>
        /// <returns></returns>
        User Find(string userName);
        /// <summary>
        /// 用户列表
        /// </summary>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="totalRecord"></param>
        /// <param name="order"></param>
        /// <returns></returns>
        IQueryable<User> FindPageList(int pageIndex, int pageSize, out int totalRecord, int order);
        /// <summary>
        /// 委托基于声明的标示
        /// </summary>
        /// <param name="user"></param>
        /// <param name="authenticationType"></param>
        /// <returns></returns>
        ClaimsIdentity CreateIdentity(User user,string authenticationType); 

    }
}
